package com.baixiaowen.disruptor.DisruptorHigh高准操作;

import com.lmax.disruptor.EventHandler;

public class Handler5 implements EventHandler<Trade> {
    @Override
    public void onEvent(Trade event, long sequence, boolean endOfBatch) throws Exception {
        System.err.println("Handler5 : GET PRICE = " + event.getPrice());
        event.setPrice(event.getPrice() + 3.0 );
        if (endOfBatch) {
            System.err.println("Handler5 is last one");
        }
    }
}
